package com.huidian.gitbatchprocessing.git.util;

import javax.swing.*;

/**
 * 应用程序工具
 *
 * @author zxb
 * @date 2021/6/21
 */
public class ApplicationUtil {

    private static final FrameInstance FRAME_INSTANCE = new FrameInstance();

    /**
     * 获取主界面的实例
     *
     * @return
     */
    public static ApplicationUtil.FrameInstance getFrameInstance() {
        return FRAME_INSTANCE;
    }

    public static class FrameInstance {
        private static JFrame J_FRAME = null;

        public synchronized void setFrame(JFrame value) {
            J_FRAME = value;
        }

        public synchronized JFrame getFrame() {
            return J_FRAME;
        }

    }
}
